import requests

cookies = {
    'ua_id': 'ys0mi4lVPDvxcHoZAAAAAIhgGyuTLgfE26jho-RaP14=',
    'wxuin': '93535588330728',
    'RK': '4Nk9OUKNFc',
    'ptcz': 'e2be327c9a84cccb5da971c97c80d80053a19f236ac2ba727bcd690711aa6000',
    'pgv_pvid': '212897872',
    'eas_sid': 'E1V6t957j5u1q3B698D2p6v418',
    'mm_lang': 'zh_CN',
    'fqm_pvqid': '8f9e7e97-1017-482b-8b4d-b1c2bb6c64c3',
    'ts_uid': '5141162266',
    'pac_uid': '0_55e2d58879649',
    'iip': '0',
    '_qimei_uuid42': '1831c1126181003367d8213180566c931ce0c4234c',
    '_qimei_fingerprint': '77c284c1caf03d5ac6ca23e43e1d422e',
    '_qimei_q36': '',
    '_qimei_h38': '8e29124867d8213180566c930200000d31831c',
    'rewardsn': '',
    '_clck': '1wmxv9l|1|fo2|0',
    'poc_sid': 'HKY1sGajHeS6OV4eSbHsm4w24BpsQSG8TVSYoQLD',
    'wxtokenkey': '777',
    'cert': '_aOh5k0kntRyjCRVdGBSglPDDSUdfdQn',
    'sig': 'h01727c4562fef184df9f13ac9cdc69197d263123b6f30b406bf072d1b7dfbd3ff1b5497975b3bfd542',
    'uuid': '28e21c4baefa0c35be4a31183de43ee4',
    'rand_info': 'CAESIOVXihaFwIdYDgieuFGIxbkm+QBMIVC7uoy6+D0LaX5p',
    'slave_bizuin': '3935637788',
    'data_bizuin': '3935637788',
    'bizuin': '3935637788',
    'data_ticket': 'bEPwPvIjgxxpNRuTpjOraYHfZZ0mqf13Gd4FQoaOqd4Mi5kzTOrkkaAMBAZ0uUCY',
    'slave_sid': 'ZHhjSTNlVmpmRlRQMkRhbnJ1V2toUXRGdEhJeGlaZlp0YVg5QUdaY0FzUWZ2VFJXUzZXMGJyY3JvdjdkQXpYdHM0a1FWRU5yTmlPSFVhODQ1TmZlb21fSUM0blBsREN4V245T2dMNHR5ZFdxNXVRM1NERmpUUE50T2Y5bDZyWVAySkN6dWtvZWs1YmZVM2ZD',
    'slave_user': 'gh_8bdd07c02cbc',
    'xid': '2515b2ffb07517294ef47a11602d0a37',
    '_clsk': '1c3if26|1722846150306|4|1|mp.weixin.qq.com/weheat-agent/payload/record',
}

headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36',
    'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
    # 'Accept-Encoding': 'gzip, deflate, br, zstd',
    'cache-control': 'max-age=0',
    'sec-ch-ua': '"Not)A;Brand";v="99", "Google Chrome";v="127", "Chromium";v="127"',
    'sec-ch-ua-mobile': '?0',
    'sec-ch-ua-platform': '"Windows"',
    'upgrade-insecure-requests': '1',
    'sec-fetch-site': 'none',
    'sec-fetch-mode': 'navigate',
    'sec-fetch-user': '?1',
    'sec-fetch-dest': 'document',
    'accept-language': 'zh-CN,zh;q=0.9',
    'priority': 'u=0, i',
    # Requests sorts cookies= alphabetically
    # 'Cookie': 'ua_id=ys0mi4lVPDvxcHoZAAAAAIhgGyuTLgfE26jho-RaP14=; wxuin=93535588330728; RK=4Nk9OUKNFc; ptcz=e2be327c9a84cccb5da971c97c80d80053a19f236ac2ba727bcd690711aa6000; pgv_pvid=212897872; eas_sid=E1V6t957j5u1q3B698D2p6v418; mm_lang=zh_CN; fqm_pvqid=8f9e7e97-1017-482b-8b4d-b1c2bb6c64c3; ts_uid=5141162266; pac_uid=0_55e2d58879649; iip=0; _qimei_uuid42=1831c1126181003367d8213180566c931ce0c4234c; _qimei_fingerprint=77c284c1caf03d5ac6ca23e43e1d422e; _qimei_q36=; _qimei_h38=8e29124867d8213180566c930200000d31831c; rewardsn=; _clck=1wmxv9l|1|fo2|0; poc_sid=HKY1sGajHeS6OV4eSbHsm4w24BpsQSG8TVSYoQLD; wxtokenkey=777; cert=_aOh5k0kntRyjCRVdGBSglPDDSUdfdQn; sig=h01727c4562fef184df9f13ac9cdc69197d263123b6f30b406bf072d1b7dfbd3ff1b5497975b3bfd542; uuid=28e21c4baefa0c35be4a31183de43ee4; rand_info=CAESIOVXihaFwIdYDgieuFGIxbkm+QBMIVC7uoy6+D0LaX5p; slave_bizuin=3935637788; data_bizuin=3935637788; bizuin=3935637788; data_ticket=bEPwPvIjgxxpNRuTpjOraYHfZZ0mqf13Gd4FQoaOqd4Mi5kzTOrkkaAMBAZ0uUCY; slave_sid=ZHhjSTNlVmpmRlRQMkRhbnJ1V2toUXRGdEhJeGlaZlp0YVg5QUdaY0FzUWZ2VFJXUzZXMGJyY3JvdjdkQXpYdHM0a1FWRU5yTmlPSFVhODQ1TmZlb21fSUM0blBsREN4V245T2dMNHR5ZFdxNXVRM1NERmpUUE50T2Y5bDZyWVAySkN6dWtvZWs1YmZVM2ZD; slave_user=gh_8bdd07c02cbc; xid=2515b2ffb07517294ef47a11602d0a37; _clsk=1c3if26|1722846150306|4|1|mp.weixin.qq.com/weheat-agent/payload/record',
}

response = requests.get('https://mp.weixin.qq.com/cgi-bin/appmsgpublish?sub=list&search_field=null&begin=0&count=5&query&fakeid=MjM5NzcxODEyMQ%3D%3D&type=101_1&free_publish_type=1&sub_action=list_ex&token=1206965315&lang=zh_CN&f=json&ajax=1', cookies=cookies, headers=headers)

print(response.json())
